package com.yykj.user.center.server.repository.patient;
import com.yykj.user.center.server.model.Address;
import com.yykj.user.center.server.model.RegisteredOrder;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.time.LocalDate;
import java.util.List;

/**
 * @author chenl
 * @version 1.0
 * @date 2021/10/20 22:24
 */
@Repository
public interface AddressRepository extends JpaRepository<Address, String>, JpaSpecificationExecutor<Address> {

    List<Address> findAllByAccountIdAndPatientCardIdAndStateOrderByCreateTimeDesc(String accountId,String patientCardId,Boolean state);

    List<Address> findAllByAccountIdAndStateOrderByCreateTimeDesc(String accountId,Boolean state);

    List<Address> findAllByAccountIdAndIsDefaultAndState(String accountId,Boolean isDefault,Boolean state);


}
